home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_cavein.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  98 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_Avalanche.cog
  4. #
  5. # This cog will createa minor cave-in effect if a switch is presed
  6. # Update will be made for IMP#1. Chris M. 12/1/97
  7. #
  8. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  9. # =========================================================
  10. symbols
  11.  
  12. message pulse
  13. message activated
  14. message timer
  15. message    startup
  16.  
  17. thing   rock0
  18. thing   rock1
  19. thing   rock2
  20. thing   rock3
  21. thing   rock4
  22. thing   rock5
  23. thing   rock6
  24. thing   rock7
  25. thing   rock8
  26. thing   rock9
  27.  
  28. thing   ghost0
  29. thing   ghost1
  30.  
  31. surface switch0
  32.  
  33. template        System=wfallbot
  34.  
  35. flex    screenshake=1
  36. flex    dummy0   local
  37. flex    dummy1   local
  38. flex    pulsetime=.1
  39. flex    movespeed=2
  40. end
  41. #======================================
  42.  
  43. code
  44.  
  45. startup:
  46. screenshake = 1;
  47. return;
  48.  
  49. activated:
  50.  
  51. SetTimerEx(1.0, 1, 0, 0);
  52. SetTimerEx(2.5, 2, 0, 0);
  53. SetTimerEx(2.5, 3, 0, 0);
  54. SetTimerEx(5.0, 4, 0, 0);
  55. return;
  56.  
  57. timer:
  58. if (GetSenderId() == 1)
  59. {
  60. movetoframe(rock0,1,movespeed);
  61. movetoframe(rock1,1,movespeed);
  62. movetoframe(rock2,1,movespeed);
  63. movetoframe(rock3,1,movespeed);
  64. movetoframe(rock4,1,movespeed);
  65. movetoframe(rock5,1,movespeed);
  66. }
  67.  
  68. else
  69. if (GetSenderId() == 2)
  70. {
  71. setpulse(pulsetime);
  72. }
  73.  
  74. else
  75. if (GetSenderId() == 3)
  76. {
  77. SetPOVShake('0.0 -.03 0.0', '1.0 0.0 0.0', .05, 80.0);
  78.  
  79. if (screenshake == 1)
  80. SetTimerEx(.10, 3, 0, 0);
  81.  
  82. }
  83.  
  84. else
  85. if (GetSenderId() == 4)
  86. {
  87. screenshake = 0;
  88. Setpulse(0.0);
  89. }
  90. return;
  91.  
  92. pulse:
  93.  
  94.     dummy0=CreateThing(System, ghost0);
  95.     dummy1=CreateThing(System, ghost1);
  96.         return;
  97.  
  98.